package GameLogic

import (
	"PBMessage"
	"time"

	"git.oschina.net/yangdao/extlib/log"
	"github.com/golang/protobuf/proto"
)

type dieState struct {
	*genericState
}

func (this *dieState) onEnter(args ...interface{}) {
	state := &PBMessage.SC_UnitState{
		UnitId: proto.Int64(this.gameUnit.GUID),
		State:  proto.Int32(3),
		Time:   proto.Int64(time.Now().UnixNano() / 1e6),
	}
	this.gameUnit.Scene.(*GameScene).sendEachPlayer(PBMessage.PBID_SC_UnitState, state)
	log.Log("GameLogic,Info", "单位进入死亡状态")
}

func (this *dieState) onUpdate(dt int) {

}
